﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="calculation.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%= ViewData["Name"]%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <%= ViewData["Name"]%></h2>
        <%= Html.ActionLink("Добавить новый заказ ","Add") %>
    <table>
        <tr>
            <td>
                
            </td>
            <td>
                Название:
            </td>
            <td>
                Дата создания:
            </td>
        </tr>
        <%
            foreach (Order t in (IEnumerable<Order>)ViewData["Заказы"])
            {%>
        <tr>
            <td>
                <%= Html.ActionLink("Посмотреть", "Order", new {id = t.OrderId })%>
            </td>
            <td>
                <%=t.Name %>
            </td>
            <td>
                <%=t.Date.ToLongDateString() %>
            </td>
        </tr>
        <% }%>
    </table>
</asp:Content>
